package io;

import java.util.ArrayList;
import java.util.Scanner;

public class Answer {
    private ArrayList<Integer> answerList;

    public ArrayList<Integer> getAnswerList() {
        return answerList;
    }

    public void setAnswerList(ArrayList<Integer> answerList) {
        this.answerList = answerList;
    }

    public Answer() {
        answerList = new ArrayList<>();
    }

    public void scanAnswerFromKeyboard(int count) {
        Scanner scanner = new Scanner(System.in);
        answerList.clear();
        ;
        System.out.println("请按照题目序号依次输入答案后回车");
        for (int i = 0; i < count; i++) {
            System.out.println("第" + (i + 1) + "题:");
            answerList.add(scanner.nextInt());

        }
//        scanner.close();

    }


}
